package com.wing.cabinet.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.CabinetCargoLane;
import com.wing.cabinet.model.entity.StorageInventoryInout;
import com.wing.cabinet.model.request.CabinetCargoLaneForm;
import com.wing.cabinet.model.request.UseInventoryInoutDetailForm;
import com.wing.cabinet.model.response.CabinetCargoLaneVO;
import com.wing.cabinet.model.response.CabinetCargoSpaceVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 刀柜货道-Service
 *
 * @author
 */
public interface CabinetCargoLaneService extends IService<CabinetCargoLane> {

    /**
     * 添加
     *
     * @param cabinetCargoLaneForm
     * @return
     */
    int add(CabinetCargoLaneForm cabinetCargoLaneForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CabinetCargoLaneVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<CabinetCargoLaneVO> pageList4app(Page page, Map<String, Object> params);

    Page<CabinetCargoLaneVO> pageList4Check(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CabinetCargoLaneVO get4appById(Long id);

    List<CabinetCargoLaneVO> getUsableSpaces(String cabCode,String skuCode,Integer quantity);

    List<CabinetCargoLaneVO> getSkuSpaces(String cabCode);

    List<CabinetCargoLaneVO> getWcabSpaceByCabCode(String cabCode,List<Integer> spaceTypes);

    List<CabinetCargoLaneVO> getWcabOptimalSpaceByCabCode(String cabCode,List<Integer> spaceTypes,String skuCode,String orderDesc);

    List<CabinetCargoLaneVO> getWcabEmptySpaces(String cabCode);

    Integer countLanesByMainCabCode(String mainCabCode);
}
